﻿using System;
using System.Collections.Generic;
using DataBaseLayer.Dto;
using Peresvet.Common.Constants;
using Peresvet.Common.Constants.Text;

namespace Peresvet.Models
{
	public class GalleryItemModel
	{
		#region Variables

		private string _name;

		#endregion

		#region Properties

		public int GalleryId { get; set; }

		public string Name
		{
			get
			{
				return _name;
			}
			set { _name = value ?? string.Empty; }
		}

		public string ShortName
		{
			get
			{
				return _name;
				//return _name.Length > ApplicationSettings.NAME_GALLERY_TEXT_LENGTH
				//	? string.Concat(_name.Substring(0, ApplicationSettings.NAME_GALLERY_TEXT_LENGTH), Symbols.ELLIPSIS)
				//	: _name;
			}
		}

		public DateTime Date { get; set; }

		public IEnumerable<ImageData> Images { get; set; }

		public string ImageUrl { get; set; }

		public string ThumbImageUrl { get; set; }

		#endregion
	}
}